<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.5"/>
<title>xiltimer: XilTimer APIs</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="HTML_custom.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="xlogo_bg.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">xiltimer
   </div>
   <div id="projectbrief">Vitis Drivers API Documentation</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.5 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Overview</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="globals.html"><span>APIs</span></a></li>
      <li><a href="files.html"><span>File&#160;List</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;"
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('group__xiltimer__api.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#define-members">Macros</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">XilTimer APIs</div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:gae14eaaed1fe7cdf491da54a714c426b3"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xiltimer__api.html#gae14eaaed1fe7cdf491da54a714c426b3">MAX_COUNT</a>&#160;&#160;&#160;0xFFFFFFFFU</td></tr>
<tr class="memdesc:gae14eaaed1fe7cdf491da54a714c426b3"><td class="mdescLeft">&#160;</td><td class="mdescRight">The ScuTimer typically operates with a 32-bit counter, and this value represents the maximum possible count that can be stored in that counter.  <a href="#gae14eaaed1fe7cdf491da54a714c426b3">More...</a><br/></td></tr>
<tr class="separator:gae14eaaed1fe7cdf491da54a714c426b3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaca6f06685ab6904b49da2f41d3c7b46b"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xiltimer__api.html#gaca6f06685ab6904b49da2f41d3c7b46b">REG_SHIFT</a>&#160;&#160;&#160;16U</td></tr>
<tr class="memdesc:gaca6f06685ab6904b49da2f41d3c7b46b"><td class="mdescLeft">&#160;</td><td class="mdescRight">the shift amount used when concatenating two registers to form a 64-bit value.  <a href="#gaca6f06685ab6904b49da2f41d3c7b46b">More...</a><br/></td></tr>
<tr class="separator:gaca6f06685ab6904b49da2f41d3c7b46b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga82aee0f8087831dfc46f2d5c884d1b0e"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xiltimer__api.html#ga82aee0f8087831dfc46f2d5c884d1b0e">XCntrVal</a>&#160;&#160;&#160;u16</td></tr>
<tr class="memdesc:ga82aee0f8087831dfc46f2d5c884d1b0e"><td class="mdescLeft">&#160;</td><td class="mdescRight">the type used to represent the value of a timer counter.  <a href="#ga82aee0f8087831dfc46f2d5c884d1b0e">More...</a><br/></td></tr>
<tr class="separator:ga82aee0f8087831dfc46f2d5c884d1b0e"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga3bf4c88807bba962c75976fed3c217d9"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xiltimer__api.html#ga3bf4c88807bba962c75976fed3c217d9">XilTimer_Sleep</a> (unsigned long delay, <a class="el" href="xiltimer_8h.html#ac78bbfcf92781c4163433b9234ca5adb">XTimer_DelayType</a> DelayType)</td></tr>
<tr class="memdesc:ga3bf4c88807bba962c75976fed3c217d9"><td class="mdescLeft">&#160;</td><td class="mdescRight">This API contains common delay implementation using library API's.  <a href="#ga3bf4c88807bba962c75976fed3c217d9">More...</a><br/></td></tr>
<tr class="separator:ga3bf4c88807bba962c75976fed3c217d9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gafc060fb73e66e0f4493f7417ef6e4047"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xiltimer__api.html#gafc060fb73e66e0f4493f7417ef6e4047">sleep</a> (unsigned int seconds)</td></tr>
<tr class="memdesc:gafc060fb73e66e0f4493f7417ef6e4047"><td class="mdescLeft">&#160;</td><td class="mdescRight">This API gives delay in sec.  <a href="#gafc060fb73e66e0f4493f7417ef6e4047">More...</a><br/></td></tr>
<tr class="separator:gafc060fb73e66e0f4493f7417ef6e4047"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga5b18907cf69292caad8910f3667e48fd"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xiltimer__api.html#ga5b18907cf69292caad8910f3667e48fd">msleep</a> (unsigned long mseconds)</td></tr>
<tr class="memdesc:ga5b18907cf69292caad8910f3667e48fd"><td class="mdescLeft">&#160;</td><td class="mdescRight">This API gives delay in msec.  <a href="#ga5b18907cf69292caad8910f3667e48fd">More...</a><br/></td></tr>
<tr class="separator:ga5b18907cf69292caad8910f3667e48fd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga068447b060a14715c07173bba411eb75"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xiltimer__api.html#ga068447b060a14715c07173bba411eb75">usleep</a> (unsigned long useconds)</td></tr>
<tr class="memdesc:ga068447b060a14715c07173bba411eb75"><td class="mdescLeft">&#160;</td><td class="mdescRight">This API gives delay in usec.  <a href="#ga068447b060a14715c07173bba411eb75">More...</a><br/></td></tr>
<tr class="separator:ga068447b060a14715c07173bba411eb75"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gafd02bb0f6a745c39d5e3417493995c71"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xiltimer__api.html#gafd02bb0f6a745c39d5e3417493995c71">__attribute__</a> ((constructor))</td></tr>
<tr class="memdesc:gafd02bb0f6a745c39d5e3417493995c71"><td class="mdescLeft">&#160;</td><td class="mdescRight">This API initializes the xiltimer library through constructor.  <a href="#gafd02bb0f6a745c39d5e3417493995c71">More...</a><br/></td></tr>
<tr class="separator:gafd02bb0f6a745c39d5e3417493995c71"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga6395671177518353e3ab5ded9609eb1e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xiltimer__api.html#ga6395671177518353e3ab5ded9609eb1e">XTimer_SetHandler</a> (XTimer_TickHandler FuncPtr, void *CallBackRef, u8 Priority)</td></tr>
<tr class="memdesc:ga6395671177518353e3ab5ded9609eb1e"><td class="mdescLeft">&#160;</td><td class="mdescRight">This routine installs an asynchronous callback function for the given FuncPtr.  <a href="#ga6395671177518353e3ab5ded9609eb1e">More...</a><br/></td></tr>
<tr class="separator:ga6395671177518353e3ab5ded9609eb1e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac2d61518eafb79f1bad01cecb9503d6c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xiltimer__api.html#gac2d61518eafb79f1bad01cecb9503d6c">XTimer_SetInterval</a> (unsigned long delay)</td></tr>
<tr class="memdesc:gac2d61518eafb79f1bad01cecb9503d6c"><td class="mdescLeft">&#160;</td><td class="mdescRight">This API sets the elapse interval for the timer instance.  <a href="#gac2d61518eafb79f1bad01cecb9503d6c">More...</a><br/></td></tr>
<tr class="separator:gac2d61518eafb79f1bad01cecb9503d6c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga30d16ade92d9b5d61797f69f06bdd7bb"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xiltimer__api.html#ga30d16ade92d9b5d61797f69f06bdd7bb">XTimer_ClearTickInterrupt</a> (void)</td></tr>
<tr class="memdesc:ga30d16ade92d9b5d61797f69f06bdd7bb"><td class="mdescLeft">&#160;</td><td class="mdescRight">This API clears the interrupt status of the tick timer instance.  <a href="#ga30d16ade92d9b5d61797f69f06bdd7bb">More...</a><br/></td></tr>
<tr class="separator:ga30d16ade92d9b5d61797f69f06bdd7bb"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Macro Definition Documentation</h2>
<a class="anchor" id="gae14eaaed1fe7cdf491da54a714c426b3"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define MAX_COUNT&#160;&#160;&#160;0xFFFFFFFFU</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>The ScuTimer typically operates with a 32-bit counter, and this value represents the maximum possible count that can be stored in that counter. </p>

</div>
</div>
<a class="anchor" id="gaca6f06685ab6904b49da2f41d3c7b46b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define REG_SHIFT&#160;&#160;&#160;16U</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>the shift amount used when concatenating two registers to form a 64-bit value. </p>
<p>the shift amount is 32, indicating a 16-bit register width. </p>

</div>
</div>
<a class="anchor" id="ga82aee0f8087831dfc46f2d5c884d1b0e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define XCntrVal&#160;&#160;&#160;u16</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>the type used to represent the value of a timer counter. </p>
<p>Depending on the architecture being targeted, it is a 16-bit unsigned integer (u16). </p>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="gafd02bb0f6a745c39d5e3417493995c71"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void __attribute__ </td>
          <td>(</td>
          <td class="paramtype">(constructor)&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This API initializes the xiltimer library through constructor. </p>
<dl class="section return"><dt>Returns</dt><dd>none </dd></dl>

<p>References <a class="el" href="xiltimer_8h.html#ae6ae23d2e575f47dcdd374cac14947ee">XilSleepTimer_Init()</a>, and <a class="el" href="xiltimer_8h.html#a261d2e800b7b82eb41e3b8f8043a5c52">XilTickTimer_Init()</a>.</p>

</div>
</div>
<a class="anchor" id="ga5b18907cf69292caad8910f3667e48fd"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void msleep </td>
          <td>(</td>
          <td class="paramtype">unsigned long&#160;</td>
          <td class="paramname"><em>mseconds</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This API gives delay in msec. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">mseconds</td><td>Delay time in milliseconds</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>none</dd></dl>
<dl class="section note"><dt>Note</dt><dd>none </dd></dl>

<p>References <a class="el" href="group__xiltimer__api.html#ga3bf4c88807bba962c75976fed3c217d9">XilTimer_Sleep()</a>, and <a class="el" href="xiltimer_8h.html#ac78bbfcf92781c4163433b9234ca5adba4300457c5c502155d5683873c208873d">XTIMER_DELAY_MSEC</a>.</p>

</div>
</div>
<a class="anchor" id="gafc060fb73e66e0f4493f7417ef6e4047"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void sleep </td>
          <td>(</td>
          <td class="paramtype">unsigned int&#160;</td>
          <td class="paramname"><em>seconds</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This API gives delay in sec. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">seconds</td><td>Delay time in seconds</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>none</dd></dl>
<dl class="section note"><dt>Note</dt><dd>none </dd></dl>

<p>References <a class="el" href="group__xiltimer__api.html#ga3bf4c88807bba962c75976fed3c217d9">XilTimer_Sleep()</a>, and <a class="el" href="xiltimer_8h.html#ac78bbfcf92781c4163433b9234ca5adba560abaa29cb456b69114f70412ecfb97">XTIMER_DELAY_SEC</a>.</p>

</div>
</div>
<a class="anchor" id="ga068447b060a14715c07173bba411eb75"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void usleep </td>
          <td>(</td>
          <td class="paramtype">unsigned long&#160;</td>
          <td class="paramname"><em>useconds</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This API gives delay in usec. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">useconds</td><td>Delay time in microseconds</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>none</dd></dl>
<dl class="section note"><dt>Note</dt><dd>none </dd></dl>

<p>References <a class="el" href="group__xiltimer__api.html#ga3bf4c88807bba962c75976fed3c217d9">XilTimer_Sleep()</a>, and <a class="el" href="xiltimer_8h.html#ac78bbfcf92781c4163433b9234ca5adbaf87fdb94b9c9f134efde527a38db6048">XTIMER_DELAY_USEC</a>.</p>

</div>
</div>
<a class="anchor" id="ga3bf4c88807bba962c75976fed3c217d9"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void XilTimer_Sleep </td>
          <td>(</td>
          <td class="paramtype">unsigned long&#160;</td>
          <td class="paramname"><em>delay</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="xiltimer_8h.html#ac78bbfcf92781c4163433b9234ca5adb">XTimer_DelayType</a>&#160;</td>
          <td class="paramname"><em>DelayType</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This API contains common delay implementation using library API's. </p>
<dl class="section return"><dt>Returns</dt><dd>none</dd></dl>
<dl class="section note"><dt>Note</dt><dd>none </dd></dl>

<p>References <a class="el" href="struct_x_timer_tag.html#a1596156ea70229b14ebdb8776e890fea">XTimerTag::XTimer_ModifyInterval</a>.</p>

<p>Referenced by <a class="el" href="group__xiltimer__api.html#ga5b18907cf69292caad8910f3667e48fd">msleep()</a>, <a class="el" href="group__xiltimer__api.html#gafc060fb73e66e0f4493f7417ef6e4047">sleep()</a>, and <a class="el" href="group__xiltimer__api.html#ga068447b060a14715c07173bba411eb75">usleep()</a>.</p>

</div>
</div>
<a class="anchor" id="ga30d16ade92d9b5d61797f69f06bdd7bb"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void XTimer_ClearTickInterrupt </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This API clears the interrupt status of the tick timer instance. </p>
<dl class="section return"><dt>Returns</dt><dd>none</dd></dl>
<dl class="section note"><dt>Note</dt><dd>none </dd></dl>

<p>References <a class="el" href="struct_x_timer_tag.html#a65213463c513915b2057907b0548a7a1">XTimerTag::XTickTimer_ClearInterrupt</a>.</p>

</div>
</div>
<a class="anchor" id="ga6395671177518353e3ab5ded9609eb1e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void XTimer_SetHandler </td>
          <td>(</td>
          <td class="paramtype">XTimer_TickHandler&#160;</td>
          <td class="paramname"><em>FuncPtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>CallBackRef</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u8&#160;</td>
          <td class="paramname"><em>Priority</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This routine installs an asynchronous callback function for the given FuncPtr. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">FuncPtr</td><td>is the address of the callback function. </td></tr>
    <tr><td class="paramname">CallBackRef</td><td>is a user data item that will be passed to the callback function when it is invoked. </td></tr>
    <tr><td class="paramname">Priority</td><td>- Priority for the interrupt</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>None </dd></dl>

<p>References <a class="el" href="struct_x_timer_tag.html#a5ba807967063169be63cde744354d0a8">XTimerTag::CallBackRef</a>, <a class="el" href="struct_x_timer_tag.html#a3e4c875a87fc8e4158293010a729bb2f">XTimerTag::Handler</a>, and <a class="el" href="struct_x_timer_tag.html#a789426610fee231cacc16560c831bc42">XTimerTag::XTimer_TickIntrHandler</a>.</p>

</div>
</div>
<a class="anchor" id="gac2d61518eafb79f1bad01cecb9503d6c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void XTimer_SetInterval </td>
          <td>(</td>
          <td class="paramtype">unsigned long&#160;</td>
          <td class="paramname"><em>delay</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This API sets the elapse interval for the timer instance. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">delay</td><td>Delay time in milliseconds</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>none</dd></dl>
<dl class="section note"><dt>Note</dt><dd>none </dd></dl>

<p>References <a class="el" href="struct_x_timer_tag.html#aa0931e9c88867714880e5d22aeca89b0">XTimerTag::XTimer_TickInterval</a>.</p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
	<p class="footer">&copy; Copyright 2015-2022 Xilinx, Inc. All Rights Reserved.</p>
	<p class="footer">&copy; Copyright 2022-2023 Advanced Micro Devices, Inc. All Rights Reserved.</p>
</div>
</body>
</html>
